#ifndef _IMGUILAYER_H_
#define _IMGUILAYER_H_

#include <memory>
#include <SECore/Layer.h>
#include <SEWindow/SDLWindow/SDLWindow.h>
// #include <functional>


namespace SEngine
{
    class ImguiLayer : public Layer
    {
    public:
        ImguiLayer(CoreApplication & app, SDLWindow & window) 
            : Layer(app), m_window(window) {}
        virtual ~ImguiLayer() = default;
        virtual std::string Name() override { return "ImguiLayer"; }

        void Attach() override;
        void Detach() override;

        void BeginFrame() override;
        void EndFrame() override;
        void Update(int delta) override;

        void OnEvent(EventPtr) override;

        // void DrawGUI(std::function<void(void)> && fn) { m_guiFns.emplace_back(std::move(fn)); }
    private:
        void OnEvent(SDL_Event & event);
    private:
        SDLWindow & m_window; 
        // std::vector<std::function<void(void)>> m_guiFns;
    };
} // namespace SEngine


#endif